package com.example.dao;

import com.example.entity.ServiceApplication;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ServiceApplicationDao {
    int insertApplication(ServiceApplication application);
    int updateApplication(ServiceApplication application);
    ServiceApplication getApplicationById(Integer applicationId);
    List<ServiceApplication> getPendingApplications();
    List<ServiceApplication> getApplicationsByUser(Integer userId);
    ServiceApplication getLatestApprovedApplication(@Param("userId") Integer userId,
                                                    @Param("applicationType") String applicationType);

}